$(document).ready(function(){
	var validator = $("#frmLogin").validate({
		errorElement:'div',
		rules: {
			username: {
				required: true,
				USERNAME: true,
				noSpace: true 
			},
			password: {
				required: true,
				PASSWORD: true
			}
		},
		messages: {
			username: {
				required: "Enter your username"
			},	
			password: {
				required: "Enter your password"
			}
		}
	});
	jQuery.validator.addMethod("USERNAME", function(value, element) {	
	var fn =  $("#username").val();	
	
	if(fn == 'Username')
		return false;
	else
		return true;
	},'Please Enter Username.');
	
	
	  jQuery.validator.addMethod("noSpace", function(value, element) { 
    return value.indexOf(" ") < 0 && value != ""; 
  }, "Space are not allowed");


	jQuery.validator.addMethod("PASSWORD", function(value, element) {	
	var fn =  $("#password").val();	
	
	if(fn == 'Password')
		return false;
	else
		return true;
	},'Please Enter Password.');
});